home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Medabots Cardz
/
Medabots CD Cardz Metabee.bin
/
mac
/
assets
/
metabee.dxr
/
00052_Script_52
< prev
next >
Wrap
Text File
|
2001-12-07
|
2KB
|
84 lines
property mysprite, dx, dy, direction, coldbusted, pSpeed, counter, animate, countex
global scorez, hit, placex, missed, randomvalue, stallamount
on beginsprite me
direction = "up"
pSpeed = 5
stallamount = 35
set mysprite to the spritenum of me
set dx to the locH of sprite mysprite
set dy to the locV of sprite mysprite
coldbusted = 1
counter = 0
end
on exitframe me
if coldbusted = 1 then
if animate = 1 then
if counter < 1 then
set the member of sprite mysprite to "meda22"
counter = counter + 1
else
counter = 0
animate = 2
end if
else if animate = 2 then
if counter < 1 then
set the member of sprite mysprite to "meda23"
counter = counter + 1
else
animate = 0
counter = 0
set the locH of sprite mysprite = -200
set the member of sprite mysprite to "meda21"
end if
end if
if random(randomvalue) = randomvalue then
coldbusted = 2
end if
else if coldbusted = 2 then
pSpeed = 2*random(5)
set the locV of sprite mysprite to dy
set the locH of sprite mysprite to dx
direction = "up"
coldbusted = 0
else
if direction = "up" then
set the locV of sprite mysprite to the locV of sprite mysprite - pSpeed
if the locV of sprite mysprite < dy-120 then
direction = "stall"
end if
else if direction = "stall" then
if countex > stallamount then
countex = 0
direction = "down"
else
set the loch of sprite mysprite to the locH of sprite mysprite
countex = countex + 1
end if
else
set the locV of sprite mysprite to the locV of sprite mysprite + pSpeed
if the locV of sprite mysprite > dy then
direction = "up"
missed = missed + 1
coldbusted = 1
end if
end if
end if
end
on mouseDown me
if coldbusted = 0 then
puppetsound "explosion"
hit = 1
animate = 1
coldbusted = 1
placex = the mouseLoc
scorez = scorez + 1
end if
end